<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>变量</title>
</head>
<body>
<script>
    /**
     *枚举树
     */
    var obj = {
        name:"zhangsan",
        age:18,
        gender:"男",
        address:"上海"
    };

    //遍历对象
    for (var objKey in obj) {
       alert(objKey+":"+obj[objKey])
    }


</script>
</body>
</html>
